<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '入库情况';
?>
<div class="sample-patient-index">

    <p>
        <?= Html::a('新建入库情况', ['/sample/create-from'], ['class' => 'btn btn-success']) ?>
    </p>

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            'tube_total',
            'tube_time',
            'tube_taker',
            // 'use_type',
            'dna_total',
            // 'dna_taker',
            // 'dna_time',
            // 'dna_pos',
            'rna_total',
            // 'rna_taker',
            // 'rna_time',
            // 'rna_pos',
            'crt_name',
            'crt_time',

            [
                'class' => 'yii\grid\ActionColumn',
                'buttons' =>[
                    'view' => function($url, $model, $key) {
                        return Html::a('<span class="glyphicon glyphicon-eye-open"></span>', '/sample/view-from?id='.$key);
                    },
                    'update' => function($url, $model, $key) {
                        return Html::a('<span class="glyphicon glyphicon-pencil"></span>', '/from/update?id='.$key);
                    },
                ],
                'template' => '{view} {update}',
            ],
        ],
    ]); ?>

</div>
